package com.funquer.cms.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-3-22
 * Time: 下午5:20
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.Table(name = "arcatt")
@Entity
@DynamicInsert(true)
@DynamicUpdate(true)
public class ArcattEntity {
    private int sortid;

    @javax.persistence.Column(name = "sortid")
    @Basic
    public int getSortid() {
        return sortid;
    }

    public void setSortid(int sortid) {
        this.sortid = sortid;
    }

    private String att;

    @javax.persistence.Column(name = "att")
    @Id
    public String getAtt() {
        return att;
    }

    public void setAtt(String att) {
        this.att = att;
    }

    private String attname;

    @javax.persistence.Column(name = "attname")
    @Basic
    public String getAttname() {
        return attname;
    }

    public void setAttname(String attname) {
        this.attname = attname;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ArcattEntity that = (ArcattEntity) o;

        if (sortid != that.sortid) return false;
        if (att != null ? !att.equals(that.att) : that.att != null) return false;
        if (attname != null ? !attname.equals(that.attname) : that.attname != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = sortid;
        result = 31 * result + (att != null ? att.hashCode() : 0);
        result = 31 * result + (attname != null ? attname.hashCode() : 0);
        return result;
    }
}
